<?php
/**
 * Created by PhpStorm.
 * User: wangkxin@foxmail.com
 * Date: 2020/11/20
 * Time: 18:30
 */

namespace App\Http\Controllers\Home;
use App\Http\Controllers\Controller;
use App\Home\Member;
class TestController extends Controller
{

    //展示页面
    public function test1()
    {
        return view('home.test1');
    }

    //ajax的响应
    public function test2()
    {
        //查询数据
        $data = Member::all();

        //json格式响应
        return response()->json($data);
    }

}